gl renderer: Move geometry calculation further down
authorTimm Bäder <mail@baedert.org>
Sun, 2 Dec 2018 08:41:13 +0000 (09:41 +0100)
committerTimm Bäder <mail@baedert.org>
Sun, 2 Dec 2018 12:25:43 +0000 (13:25 +0100)
We don't need it above, so move it to where it belongs.

gsk/gl/gskglrenderer.c

index 40b601fe908bfda920398b7e842935e626083b77..81453b421afc133c0e3234990b864fe868ba28e4 100644 (file)
@@ -1515,11 +1515,6 @@ render_shadow_node (GskGLRenderer       *self,
 
       g_assert (shadow->radius <= 0);
 
-      min_x = shadow_child->bounds.origin.x;
-      min_y = shadow_child->bounds.origin.y;
-      max_x = min_x + shadow_child->bounds.size.width;
-      max_y = min_y + shadow_child->bounds.size.height;
-
       if (gsk_render_node_get_node_type (shadow_child) == GSK_TEXT_NODE)
         {
           ops_offset (builder, dx, dy);
@@ -1528,6 +1523,11 @@ render_shadow_node (GskGLRenderer       *self,
           continue;
         }
 
+      min_x = shadow_child->bounds.origin.x;
+      min_y = shadow_child->bounds.origin.y;
+      max_x = min_x + shadow_child->bounds.size.width;
+      max_y = min_y + shadow_child->bounds.size.height;
+
       /* Draw the child offscreen, without the offset. */
       add_offscreen_ops (self, builder,
                          &shadow_child->bounds,